Skip to content

Fix create diff error#613

Merged
MarcelGeo merged 2 commits intomasterfrom
fix_create_diff_error
Apr 29, 2026
Merged

Fix create diff error#613
MarcelGeo merged 2 commits intomasterfrom
fix_create_diff_error

Conversation

@varmar05
Copy link
Copy Markdown
Collaborator

Fix the error for creating diff files on server side which would happen if temp copy and target diff file had the same name and was removed from disk by mistake (e.g. in case of geodiff copy error).

Make temp changeset and destination changeset have unique names which differ to avoid removing of live diff file.
@varmar05 varmar05 requested a review from MarcelGeo April 28, 2026 08:51
@coveralls
Copy link
Copy Markdown

Coverage Report for CI Build 25043280787

Coverage increased (+0.06%) to 93.303%

Details

  • Coverage increased (+0.06%) from the base build.
  • Patch coverage: 1 uncovered change across 1 file (22 of 23 lines covered, 95.65%).
  • No coverage regressions found.

Uncovered Changes

File Changed Covered %
server/mergin/sync/tasks.py 2 1 50.0%

Coverage Regressions

No coverage regressions found.


Coverage Stats

Coverage Status
Relevant Lines: 9826
Covered Lines: 9168
Line Coverage: 93.3%
Coverage Strength: 0.93 hits per line

💛 - Coveralls

Copy link
Copy Markdown
Collaborator

@MarcelGeo MarcelGeo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we want to add some guards when project changeset fails?

@varmar05
Copy link
Copy Markdown
Collaborator Author

Do we want to add some guards when project changeset fails?

What guards do you mean? If changeset fails it will do force update instead.

@MarcelGeo
Copy link
Copy Markdown
Collaborator

MarcelGeo commented Apr 29, 2026

Do we want to add some guards when project changeset fails?

What guards do you mean? If changeset fails it will do force update instead.

I meant this, If we do not want to add some Os errors handling or it's fine.
We can make it another issue.

except (GeoDiffLibError, GeoDiffLibConflictError) as e:
                # diff is not possible to create - file will be overwritten
                move_to_tmp(diff_file)
                return Err(self.gediff_log.getvalue())

@MarcelGeo MarcelGeo merged commit 5b51a25 into master Apr 29, 2026
4 checks passed
@MarcelGeo MarcelGeo deleted the fix_create_diff_error branch April 29, 2026 06:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants